using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace deckAnalyser.Controls
{
    public partial class CardDetailsControl : UserControl
    {
        public CardDetailsControl()
        {
            InitializeComponent();
        }

        public String CardName { set { tbCardName.Text = value; UpdateData(); } get { return tbCardName.Text; } }
        public String CardCost { set { tbCardCost.Text = value; } get { return tbCardCost.Text;  } }
        public String CardType { set { tbCardType.Text = value; } get { return tbCardType.Text; } }
        public String CardSet { set { tbCardSet.Text = value; } get { return tbCardSet.Text; } }
        public String CardRarity { set { tbCardRarity.Text = value; } get { return tbCardRarity.Text; } }
        public String CardText { set { tbCardText.Text = value; } get { return tbCardText.Text; } }


        private void UpdateData()
        {
            if (cardView != null)
            {
                CardView.CardName = CardName;
            }
        }

        private CardViewControl cardView = null;
        public CardViewControl CardView
        {
            get { return cardView; }
            set { cardView = value; UpdateData(); }
        }
    }


}
